﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject;
using Timetable.Base.Interfaces.Repositories;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Validators;

namespace Timetable.Data.Services.DataServices
{
    class TutorialTypeService:BaseDataService<TutorialType>
    {
        IRepository<TutorialType> _repository;

        IValidator<TutorialType> _validator;

        [Inject]
        public TutorialTypeService(IRepository<TutorialType> repository, IValidator<TutorialType> validator)
        {
            _repository = repository;
            _validator = validator;
        }

        public override IQueryable<TutorialType> All()
        {
            return _repository.Get();
        }

        public override IRepository<TutorialType> Repository
        {
            get { return _repository; }
        }

        public override IValidator<TutorialType> Validator
        {
            get { return _validator; }
        }

        public override TutorialType GetById(int id)
        {
            return _repository.GetById(id);
        }
    }
}
